
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
      
    </style>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">推广短信账号设置</h2>
    </div>
    <table class="table table-bordered bud_hei">
        <tr> 
            <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-info" id="addNote">新增</a><span class="lr_5"></span><span class="colorRed">注：本功能用于设置短信发送</span></td>
          </tr>
    </table>
    <!-- 标题 -->
    <div class="row-margin-top">
    <form action=""  class="form-inline">
      <table class="table table-striped table-bordered table-hover bud_hei text-center" id="verifytable">
      	  <tr>
			    <th colspan="5"><button class="btn-info btn btn-sm" type="button" id="checkAll1">全选</button><span class="lr_5"></span><button class="btn-danger btn btn-sm" type="button" id="del_this">删除</button></th>
      	 </tr>
          <tr class="info">
            <td style="vertical-align: middle !important;text-align: center;width: 3%">
              <!-- <input type="checkbox" name="items" id="checkAll"> -->
            </td>
            <td class="text-center">No.</td>
            <td class="text-center">所属部门</td>
            <td class="text-center">职员姓名</td>
            <td class="text-center">操作</td>
          </tr>
              <tr>
              		<td align="center"><input type="checkbox" name="items"></td>
                    <td>1</td>
                    <td>财务部</td>
                    <td>唐海燕</td>
                    <td><a href="javascript:;" class="del_this">删除</a></td>
              </tr>
              <tr>
              		<td align="center"><input type="checkbox" name="items"></td>
                    <td>2</td>
                    <td>财务部</td>
                    <td>唐海燕</td>
                    <td><a href="javascript:;" class="del_this">删除</a></td>
              </tr>
               <tr>
               		<td align="center"><input type="checkbox" name="items"></td>
                    <td>3</td>
                    <td>财务部</td>
                    <td>唐海燕</td>
                    <td><a href="javascript:;" class="del_this">删除</a></td>
              </tr>
      </table>
         <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5>
    
      <!--   <h3 class="text-center">对不起没有查询到符合条件的信息</h3> -->
     
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!--统计代码，可删除-->
    <!-- <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>
     <script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
    <script>

      
        $(document).ready(function(){
            // $("#verifytable tbody tr td").find('.duigou')
          /*格式化数字金额*/
          var $ObjectNum =$(".ObjectNum");
             toNum($ObjectNum);
          /*为已生效的核销申请字体加粗*/
            var $duigou =$(".duigou");
             $duigou.parent().addClass("font-bold");

/*删除*/
        $("#del_this").click(function() {
            // $("#alert_addNewZone").show();
            var $items = $("[name=items]:checkbox")
            var $is_verify=$(".is_verify");
            if ($items.filter(':checked').length < 1) {
                sweetAlert("", "请至少选择一条要删除的白名单！", "error");
            } else {
              $items.each(function(){ 
              	if( $(this).is(':checked')){
              		 $(this).parent().parent().remove();
              		}
				}); 
            }
        });

/*全选*/

$("#checkAll1").click(function(){
   $("[name=items]:checkbox").prop("checked", true);
    $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#f8f800")
})
/*反选*/

$("#no_checkAll").click(function(){
   $("[name=items]:checkbox").prop("checked", false);
    $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#fff")
})
          /*table表格操作*/
      $("#checkAll").click(function() {

            $("[name=items]:checkbox").prop("checked", $(this).prop("checked"));
            if ($("[name=items]:checkbox").prop("checked") != true) {
                // console.log($(this))
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#fff")
            } else {
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#f8f800")

            }
        })
        $("[name=items]:checkbox").click(function() {
            //定义一个临时变量，避免重复使用同一个选择器选择页面中的元素，提高程序效率
            // console.log(1)
            var $tmp = $("[name=items]:checkbox");
            if ($(this).prop("checked") != true) {
                // console.log($(this))
                $(this).parent().parent().css("backgroundColor", "#fff")
            } else {
                $(this).parent().parent().css("backgroundColor", "#f8f800")

            }
            //用filter()方法筛选出选中的复选框，并直接给CheckedAll赋值
            $("#checkAll").prop('checked', $tmp.length == $tmp.filter(':checked').length);

          })
        })
   /*新增*/ 
   $("#addNote").click(function(){
        //iframe层-父子操作
            layer.open({
                type: 1,
                title: '添加推广短信账号',
                 area: ['700px', '500px'],
                fixed: false, //不固定
                maxmin: true,
                content: '<div class="ibox-content"><form class="form-horizontal m-t" id="signupForm">  <div class="form-group"><label class="col-sm-3 control-label">用户名：</label><div class="col-sm-8"><input id="username" name="username" class="form-control" type="text" aria-required="true" aria-invalid="true" class="error"></div></div><div class="form-group"><label class="col-sm-3 control-label">密码：</label><div class="col-sm-8"><input id="password" name="password" class="form-control" type="password"></div></div>   <div class="form-group"><label class="col-sm-3 control-label">服务器URL：</label><div class="col-sm-8"><input id="curl" type="url" class="form-control" name="url"></div></div>  <div class="form-group"><div class="col-sm-4 col-sm-offset-3"><button class="btn btn-primary" type="submit">提交</button><span class="lr_5"></span><button class="btn btn-warning">取消</button></div></div></form></div>'
            });
            return false

   })  

   $(document).on("click",".del_this",function() {
      
                swal({
                            title: "提示",
                            text: "您真的要删除么？",
                            type: "warning",
                            showCancelButton: true,
                            confirmButtonColor: "#FF3333",
                            confirmButtonText: "确定",
                            cancelButtonText: "取消",
                            closeOnConfirm: true
                        })
                        // function (isConfirm) {
                        //   if (isConfirm) {
                        //    //alert(cid);
                        //     $.post("{:url('Productsseries/dropser')}",{sid:sid},function(re){
                        //       //alert(re);
                        //         if(re==1){
                        //             swal({
                        //             title: "完成",
                        //             text:  "系列已删除",
                        //             type: "success"
                        //             },function(){
                        //                 location.href='{:url("Productsseries/series")}';
                                        
                        //             });
                        //         }else{
                        //              swal({
                        //             title: "错误",
                        //             text:  "系统繁忙请稍后再试",
                        //             type: "warning"
                        //             });
                        //         }
                        //     })
                        // }
                        // })
        });
    </script>
</body>

</html>
